package com.android.car_bluetooth_audio;

import android.app.Application;




public class App extends Application {
    private static App application;

    private String KEY_BUGLY_SIE = "235df41f83";
    @Override
    public void onCreate() {
        super.onCreate();
        application = this;

        //TODO：内存泄漏检测
//        LeakCanary.Config config = LeakCanary.getConfig();
//        LeakCanary.Config.Builder builder = config.newBuilder();
//        config = builder
//                .retainedVisibleThreshold(1)
//                .dumpHeap(config.getDumpHeap())
//                .computeRetainedHeapSize(config.getComputeRetainedHeapSize())
//                .leakingObjectFinder(config.getLeakingObjectFinder())
//                .maxStoredHeapDumps(config.getMaxStoredHeapDumps())
//                .dumpHeapWhenDebugging(true)
//                .metadataExtractor(config.getMetadataExtractor())
//                .objectInspectors(config.getObjectInspectors())
//                .onHeapAnalyzedListener(config.getOnHeapAnalyzedListener())
//                .referenceMatchers(config.getReferenceMatchers())
//                .requestWriteExternalStoragePermission(config.getRequestWriteExternalStoragePermission())
//                .build();
//
//        LeakCanary.setConfig(config);



        //CrashReport.initCrashReport(getApplicationContext(), "6a3a647e6a", true);
//bugly
//        CrashReport.initCrashReport(
//                getApplicationContext(),
//                KEY_BUGLY_SIE,
//                false
//        );
    }

    public static App getApplication() {
        return application;
    }



}
